package com.qxbb.report.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qxbb.report.dao.*;

import com.qxbb.report.pojo.ChainSalesOrderProduct;
import com.qxbb.report.pojo.ProductBarcodePic;
import com.qxbb.report.service.ProductBarcodePicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

/**
 * @version 1.0
 * @author: pebble
 * @data 2023/10/9 13:39
 */
@Service
public class ProductBarcodePicServiceImpl extends ServiceImpl<ProductBarcodePicMapper, ProductBarcodePic> implements ProductBarcodePicService {


    @Autowired
    private ProductBarcodePicMapper picMapper;


    /**
     * 根据条码查询条码平面压缩图是否存在
     *
     * @param barcode
     * @return
     */
    public ProductBarcodePic selectPicByBarcode(String barcode) {
        ProductBarcodePic pic = new ProductBarcodePic();
        if (ObjectUtils.isEmpty(pic)) {
            pic = null;
        } else {
            pic = picMapper.selectPicByBarcode(barcode);
        }
        return pic;
    }

}